﻿<div [@routerTransition]>
    <import-to-excel title="燃动成本导入" [excelType]="excelType"></import-to-excel>
    <div style="width:120px;display:inline-block;">
        <button pButton type="button" label="导入记录"></button>
    </div>
    <!-- <div class="m-subheader ">
        <div class="d-flex align-items-center">
            <div class="mr-auto col-xs-6">
                <h3 class="m-subheader__title m-subheader__title--separator"><span>间接成本导入</span></h3>
                <span>
                    <span style="margin-left:10px;">选择时间：</span>
                    <div style="width:120px;display:inline-block;">
                        <p-calendar
                            [(ngModel)]="selectedDate"
                            view="month"
                            dateFormat="yy-mm"
                            [yearNavigator]="true"
                            yearRange="2000:2030"
                            [locale]="calendarHelper.cn"
                        ></p-calendar>
                    </div>
                </span>
            </div>
            <div class="col-xs-6 text-right">
                <span *ngIf="fileName" style="margin-right:20px; color: #20c997;">{{ fileName }}</span>
                <excel-import
                    [showIcon]="false"
                    [onlyLink]="false"
                    [btnColor]="'success'"
                    [btnText]="'导入(按导出模板)'"
                    (onUpload)="onUpload($event)"
                ></excel-import>
                <button class="btn btn-primary" (click)="confirmImport()" style="margin-left: 10px;">确认导入</button>
            </div>
        </div>
    </div>

    <div class="m-content">
        <div class="m-portlet m-portlet--mobile">
            <div class="m-portlet__body">
                <div class="row align-items-center">
                    <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
                        <p-table
                            #dataTable
                            [value]="datas"
                            rows="100"
                            [paginator]="false"
                            [scrollable]="true"
                            ScrollWidth="100%"
                            [responsive]="primengTableHelper.isResponsive"
                        >
                            <ng-template pTemplate="header">
                                <tr>
                                    <th width="120px" *ngFor="let col of cols" [innerHTML]="col.header"></th>
                                </tr>
                            </ng-template>
                            <ng-template pTemplate="body" let-record="$implicit">
                                <tr>
                                    <td width="120px" *ngFor="let col of cols">
                                        {{ record[col.field] }}
                                    </td>
                                </tr>
                            </ng-template>
                        </p-table>
                    </div>
                </div>
            </div>
        </div>
    </div> -->
</div>
